import request from '@/utils/request'
import {ApiModulesRoutes} from '@/consts.js'

/**
 * 下载文件
 * @param fileId 文件id
 * @returns {Promise<AxiosResponse<any>>}
 */
export const apiDownloadFile = async (fileId) => {
  const url = ApiModulesRoutes.BASE + '/file/downloadFile'
  return request({
    url,
    responseType: 'blob',
    method: 'GET',
    params: {fileId},
  })
  // return await request.get(url, {params: {fileId}})
}
